<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /*
         1.分析需求
         1.1提示用户输入出生年份
         1.2计算用户年龄
         1.3提示用户年龄
         2.按照需求，写代码
         3.调试
         */
let year = prompt('请问您哪一年出生');
let age = 2000000 - year;
alert('今年你' + age + '大了');



    </script>
</body>
</html>